package day5;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86187
 * Date: 2022-10-13
 * Time: 19:16
 */
public class foo {
    public static void main1(String sgf[]) {
        StringBuilder a = new StringBuilder("A");
        StringBuilder b = new StringBuilder("B");
        operate(a,b);
        System.out.println(a+"."+b);
    }

    private static void operate(StringBuilder a, StringBuilder b) {
        a.append(b);
        b = a;
    }

    public static void main2(String[] args) {
        String s;
        //System.out.println("s = " + s);
    }

    public static void main3(String[] args) {
        int x,y;
        x = 5 >> 2;
        y = x >>> 2;
        System.out.println(y);
    }


    String str = new String("good");
    char[] ch = {'a','b','c'};
    public static void main(String[] args) {
        foo ex = new foo();
        ex.change(ex.str,ex.ch);

        System.out.print(ex.str + " and ");
        System.out.println(ex.ch);
    }

    private void change(String str, char[] ch) {
        str = "test ok";
        ch[0] = 'g';
    }
}
